<?php
include '../common.php';
$id   = (int)$_POST['id'];
$user = (int)$_POST['user'];
$sql = "SELECT * FROM user WHERE id = '{$id}'";
$row = select($sql,$DB);
if (!$row) {
	exit('参数有误');
}
$sql = "UPDATE user SET user = ' " .$user. " ' WHERE id = '$id'";
$row = update($sql,$DB);

if (!$row) {
	exit('密码修改不成功');
}
header("location:../admin_user/user.php",302);